package example.com.zyfypt_618zgm.model;


import java.util.List;

import example.com.zyfypt_618zgm.bean.CollectResult;
import example.com.zyfypt_618zgm.bean.ModBean;
import example.com.zyfypt_618zgm.iface.ListCollectiface;
import example.com.zyfypt_618zgm.service.ListCollectService;
import retrofit2.Call;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

/**
 * Created by 小茗同学 on 2017/6/1.
 */

public class ListCollectModel implements ListCollectiface {
    private Retrofit retrofit;
    private String BASEURL="http://amicool.neusoft.edu.cn/";
    public ListCollectModel() {
        retrofit =new Retrofit.Builder().baseUrl(BASEURL).addConverterFactory(GsonConverterFactory.create()).build();
    }

    @Override
    public Call<List<CollectResult<ModBean>>> getResult(String mod, int resid, String sessionID) {
        ListCollectService ListCollectService =retrofit.create(ListCollectService.class);
        return ListCollectService.getCArticleList(mod,resid,sessionID);
    }
}
